package cn.fscode.code.generator.model.resp;

import cn.fscode.commons.tool.core.UUIDUtils;
import lombok.*;

import java.util.List;

/**
 * Velocity 变量
 * @author shenguangyang
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class VelocityVariableResp {
    private String key;
    private String tab;
    private List<Variable> varList;

    @Getter
    @Setter
    public static class Variable {
        /**
         * 表达式
         */
        private String expression;
        private String text;
        private Boolean isClickInsert;
        /**
         * 前端vue3 tree需要
         */
        private String key;
        private List<Variable> children;

        public Variable() {
            this.key = UUIDUtils.fastUUID();
        }
    }
}
